package com.chauhai.android.batsg.demo.db.sqlite.db;import android.content.Context;import com.chauhai.android.batsg.demo.db.sqlite.bean.BCategory;/** * DB adapter class to access to table category. */public class DCategory extends DbAdapter<DCategory, BCategory> {  /**   * Constructor.   *   * @param context   */  public DCategory(Context context) {    super(context);  }  /**   * Remove category and its items in the database.   * @param id   * @return   */  public void remove(long id) {    // Delete items belong to this category.    DItem dItem = new DItem(context).open();    dItem.delete("category_id = " + id, null);    // Delete the record itself.    super.delete(id);  }}